﻿<%@ Control Language="C#" AutoEventWireup="true" Codebehind="ContentList.ascx.cs"
    Inherits="Framework.Module.CMS.Web.HomePage.ContentList" %>
<%@ Import Namespace="Framework.Module.CMS.Library.Definitions" %>
<%@ Import Namespace="Framework.Library.Utilities" %>
<%@ Register Assembly="Framework.Module.MultiLanguage" Namespace="Framework.Module.MultiLanguage.WebControls"
    TagPrefix="cc1" %>
<asp:TextBox ID="txtHiddenValue" runat="server" Visible="False" Width="1px"></asp:TextBox>
<%
    if (this.dt != null)
    {
%>
<table width="495" cellpadding="0" cellspacing="0" border="0">
    <%
        for (int i = 0; i < 5; i++)
        {
            if (i == 0)
            {    
    %>
    <tr>
        <th background="/images/HomePage/bg_content_TT.jpg" scope="col">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                <% if (this.dt.Rows[i]["Content_Avatar"].ToString() != "")
                   { %>
                    <th width="120" align="left" valign="top" scope="col">
                        <img src="<%= this.dt.Rows[i]["Content_Avatar"].ToString() %>" width="120" height="90"
                            border="0" /></th>
                            <% } %>
                    <th width="10" scope="col">
                        <img src="/images/HomePage/blank.gif" width="10" height="10" /></th>
                    <th align="left" valign="top" scope="col">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <th scope="col">
                                    <img src="/images/HomePage/blank.gif" width="7" height="7" /></th>
                            </tr>
                            <tr>
                                <th class="text5" scope="col">
                                    <span id="Title">
                                        <a href="<% = BuildUrlByDistId((int)this.dt.Rows[i]["Content_ID"], this.curZone.Zone_ID) %>" style="text-decoration:none;"><%= this.dt.Rows[i]["Content_Headline"].ToString()%></a>
                                    </span>
                                </th>
                            </tr>
                            <tr>
                                <th scope="col">
                                    <img src="/images/HomePage/blank.gif" width="15" height="15" /></th>
                            </tr>
                            <tr>
                                <th class="text9" scope="col">
                                    <p>
                                        <span id="ShortContent">
                                            <%= ConvertUtility.ToStringWithoutFontBold(this.dt.Rows[i]["Content_Teaser"], 150)%>
                                        </span>
                                    </p>
                                    <p>
                                        &nbsp;</p>
                                </th>
                            </tr>
                            <tr>
                                <th class="text8" scope="col">
                                    <a href="<% = BuildUrlByDistId((int)this.dt.Rows[i]["Content_ID"], this.curZone.Zone_ID) %>"  class="text8" style="cursor: pointer;">
                                        <cc1:MLLabel ID="lbchitiet" runat="server" CssClass="text8" LanguageKey="chitiet"></cc1:MLLabel>&nbsp;<img
                                            src="/images/HomePage/icon2.gif" style="border:none" /></a></th>
                            </tr>
                            <tr>
                                <th class="text8" scope="col">
                                    &nbsp;</th>
                            </tr>
                        </table>
                    </th>
                    <th width="20" align="left" valign="top" scope="col">
                        <img src="/Images/HomePage/blank.gif" width="20" height="10" /></th>
                </tr>
            </table>
        </th>
    </tr>
    <tr>
        <th height="30" background="/Images/HomePage/bg_content_TT2.jpg" scope="col">&nbsp;</th>
    </tr>
    <tr>
        <th scope="col">
            <img src="/Images/HomePage/blank.gif" width="20" height="20" /></th>
    </tr>    
    <%
            }
            if (1 <= i && i <= 4 && i < this.dt.Rows.Count)
            {
    %>
    <tr>
        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <th class="text5" scope="col">
                        <span id="Title">
                            <a href="<% = BuildUrlByDistId((int)this.dt.Rows[i]["Content_ID"], this.curZone.Zone_ID) %>" style="text-decoration:none;"><%= this.dt.Rows[i]["Content_Headline"].ToString()%></a>
                        </span>
                    </th>
                </tr>
                <tr>
                    <th scope="col">
                        <img src="/images/HomePage/blank.gif" width="15" height="15" /></th>
                </tr>
                <tr>
                    <th class="text9" scope="col">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <% if (this.dt.Rows[i]["Content_Avatar"].ToString() != "")
                                   { %>
                                <td width="120">                                
                                    <img src="<%= this.dt.Rows[i]["Content_Avatar"].ToString() %>" width="120" height="87" /></td>
                                    <% } %>
                                <td width="10">
                                    <img src="/Images/HomePage/blank.gif" width="10" height="10" /></td>
                                <td valign="top" class="text9">
                                    <%= ConvertUtility.ToStringWithoutFontBold(this.dt.Rows[i]["Content_Teaser"], 150)%>
                                </td>
                            </tr>
                        </table>
                    </th>
                </tr>
                <tr>
                    <th class="text9" scope="col">
                        &nbsp;</th>
                </tr>
                <tr>
                    <th valign="bottom" scope="col">
                        <img src="/images/HomePage/line1.jpg" width="442" height="1" align="absbottom" /><a href="<% = BuildUrlByDistId((int)this.dt.Rows[i]["Content_ID"], this.curZone.Zone_ID) %>" class="text8" style="cursor: pointer;"><cc1:MLLabel ID="MLLabel1" runat="server" CssClass="text8"
                                LanguageKey="chitiet">&nsbp;</cc1:MLLabel><img src="/images/HomePage/icon2.gif" style="border: none" /></a></th>
                </tr>
                <tr>
                    <th scope="col" valign="bottom"><img src="/Images/HomePage/blank.gif" width="25" height="25"></th>
                </tr>
            </table>
        </td>
    </tr>
    <%
            }
        }    
        %> 
</table>
    <%
     if(this.dt.Rows.Count > 5) {
    %>
<table width="495" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <th class="text10" scope="col">
                        <cc1:MLLabel runat = "server" ID = "tinkhac" LanguageKey = "tindadua"></cc1:MLLabel>
                    </th>
                </tr>
                <tr>
                    <th scope="col">
                        <img src="/images/HomePage/blank.gif" width="15" height="15" /></th>
                </tr>
    <%      for (int i = 5; i< this.dt.Rows.Count; i++)
            {
    %>    
                <tr>
                    <th align="left" valign="top" class="text9" scope="col">
                        <table width="100%" border="0" cellspacing="6" cellpadding="0">
                            <tr>
                                <th width="10" scope="col">
                                    <img src="/images/HomePage/blank.gif" width="10" height="10" /></th>
                                <th width="10" align="left" scope="col">
                                    <img src="/images/HomePage/icon1.gif" width="4" height="4" /></th>
                                <th class="text4" scope="col">
                                    <a href="<% = BuildUrlByDistId((int)this.dt.Rows[i]["Content_ID"], this.curZone.Zone_ID) %>" class="text4" style="cursor: pointer;"><span id="Title">
                                            <%= ConvertUtility.ToStringWithoutFontBold(this.dt.Rows[i]["Content_Headline"], 80)%>
                                        </span></a>
                                </th>
                            </tr>
                        </table>
                    </th>
                </tr>                
    <%
            }    
    %>
                <tr>
                    <th class="text9" scope="col">
                        &nbsp;</th>
                </tr>
                <tr>
                    <th align="right" scope="col">
                        <a href="#" class="text8"> <cc1:MLLabel runat ="server" ID = "xemtiep" LanguageKey = "xemtieptin"></cc1:MLLabel> <img src = "/Images/HomePage/icon2.gif" style ="border:none"/> 
                        </a></th>
                </tr>
            </table>
        </td>
    </tr>
</table>               
    <%  }
    }
         %>